//
//  YAYIAboutCell.m
//  yayi
//
//  Created by Veer on 16/3/22.
//  Copyright © 2016年 hxp. All rights reserved.
//

#import "YAYIAppointDetailCell.h"


@implementation YAYIAppointDetailItem

@end


@interface YAYIAppointDetailCell()

@property (nonatomic, weak) UILabel *detailLbl;

@end

@implementation YAYIAppointDetailCell

- (void)setItem:(YAYIAppointDetailItem *)item
{
    _item = item;
    
    self.textLabel.text = item.title;
    self.detailLbl.text = item.detail;
}

+ (instancetype)cellWith:(UITableView *)tableview
{
    static NSString *cellID = @"aboutcell";
    
    YAYIAppointDetailCell *cell = [tableview dequeueReusableCellWithIdentifier:cellID];
    
    if (nil == cell) {
        cell = [[YAYIAppointDetailCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellID];
    }
    
    return cell;
}



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.accessoryType = UITableViewCellAccessoryNone;
        self.textLabel.mj_x = 30;
        self.textLabel.font = [UIFont systemFontOfSize:15];
        self.textLabel.textColor = YAYIColor(146, 146, 146);
        self.textLabel.text = @"就诊医院";
        
        UILabel *detailLbl = [[UILabel alloc] init];
        detailLbl.text = @"天津德贝尔口腔诊所";
//        detailLbl.textColor = YAYIColor(146, 146, 146);
        detailLbl.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:detailLbl];
        self.detailLbl = detailLbl;
    }
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.textLabel.mj_x = 20;
    
    [self.detailLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_centerX).offset(-30);
        make.right.equalTo(self);
        make.height.equalTo(@30);
        make.centerY.equalTo(self);
        
    }];
}

@end
